from django.contrib.auth.models import AbstractUser
from django.db import models

# Create your models here.


class Users(AbstractUser):
    """max_length 最大长度 unique不能重复  verbose_name描述信息 """

    phone = models.CharField(max_length=11,unique=True,verbose_name="手机号")

    class Meta:
        # 表名
        db_table = 't_user'
        verbose_name = '用户表'
        # 原数据信息
        verbose_name_plural = verbose_name

    def __str__(self):
        # 把名字打印出来
        return self.username

